package com.aaa.multithreading.demo01;

/**
 * @author C-Q
 * @version 1.1.0
 * @Description: 通过继承Thread实现多线程
 * @date 2022/10/31
 */
public class My1 extends Thread{
    public My1(String name) {
        super(name);
    }

    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 20; i++) {
//            System.out.println("线程1" + i);
            System.out.println(Thread.currentThread().getName()+"执行=="+i);
        }
    }
}
